package lab02.test03;

public class Student {
    //属性：成绩
    float computerScore;
    float matchScore;
    float englishScore;

    public Student() {
    }

    //行为：总分，平均分，最低分，最高分。
    float  sum(){

        return  computerScore+matchScore+englishScore;
    }

    float  average(){

        return  (computerScore+matchScore+englishScore)/3;
    }

    float  maxScore(){

        float maxScore;
        if (computerScore>matchScore)
        {
            if(computerScore>englishScore)maxScore=computerScore;
            else maxScore=englishScore;
            }
            else
        {
            if (matchScore>englishScore)maxScore=matchScore;
            else  maxScore=englishScore;
        }

    return maxScore;}

    float  minScore(){

        float minScore;
        if (computerScore>matchScore)
        {
            if (computerScore>englishScore)minScore=englishScore;
            else minScore=englishScore;
        }
        else
        {
            if (matchScore>englishScore)minScore=englishScore;
            else minScore=matchScore;
        }
    return minScore;
    }

    void printfStudent(){

    }

}
